package com.lzy.thread;

import java.util.concurrent.locks.ReentrantLock;

public class WaitTest {

    public synchronized void testWait() {
        System.out.println("Start-----");
        try {
            wait(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("End-------");
    }

    public static void main(String[] args) {
        final WaitTest test = new WaitTest();
        new Thread(new Runnable() {
            @Override
            public void run() {
                test.testWait();
            }
        }).start();

        ReentrantLock lock = new ReentrantLock();
        lock.lock();
        lock.unlock();
    }
}
